<template>
    <div class="student">
        <h3>学生姓名：{{name}}</h3>
        <h3>学生性别：{{sex}}</h3>
        <h3>学生年龄：{{age}}</h3>
        <button @click="submit">发送</button>
    </div>
</template>

<script>
    export default{
        name:'Student',
        data() {
            return {
                name:'王晓航',
                age:21,
                sex:'男'
            }
        },
        methods: {
            submit(){
                // 触发
                this.$bus.emit('getStuName',this.name)
            }
        },

    }
</script>


<style scoped>

</style>
